Skip to content

Size is always one in curl functions#22733

Merged
Girgias merged 1 commit into
php:masterfrom
Sjord:curl-size-always-one
Jul 17, 2026
Merged

Size is always one in curl functions#22733
Girgias merged 1 commit into
php:masterfrom
Sjord:curl-size-always-one

Conversation

@Sjord

@Sjord Sjord commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Assert and take advantage of that size is always 1. This is also documented in the curl docs. So there is no need to multiply with size, so this can be removed.

I started this to see whether size * nmemb can overflow. This makes it clear that it cannot.

Assert and take advantage of that size is always 1. This is also
documented in the curl docs. So there is no need to multiply with size,
so this can be removed.

I started this to see whether size * nmemb can overflow. This makes it
clear that it cannot.
@Sjord
Sjord requested a review from adoy as a code owner July 14, 2026 17:06
@Sjord

Sjord commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@nikic could you review this?

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that Nikita is no longer involved with PHP.

@Girgias
Girgias merged commit ff23286 into php:master Jul 17, 2026
18 checks passed
@Sjord

Sjord commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants